package router

import (
	jwt "gitee.com/sansaniot/ssiot-core/httpmvc/jwtauth"
	"github.com/gin-gonic/gin"

	"ssnotify/internal/notify/apis"
)

func init() {
	RouterCheckRole = append(RouterCheckRole, registerNotifyTemplateRouter)
}

func registerNotifyTemplateRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
	api := apis.NotifyTemplate{}
	r := v1.Group("/api/notification/template").Use(authMiddleware.MiddlewareFuncWithOutValidate())
	{
		r.GET("/find", api.FindNotifyTemplate)
		r.POST("/add", api.AddNotifyTemplate)
		r.POST("/modify", api.EditNotifyTemplate)
		r.POST("/remove", api.DeleteNotifyTemplate)
	}
}
